package com.mxpio.erp.common.workshop.entity;

import com.mxpioframework.jpa.annotation.DictAble;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

@Data
@Entity
@Table(name = "v_mb_erp_purchase_odline_exec_delay")
@Schema(description="采购订单明细执行准时率统计")//统计当月采购订单明细(创建时间) 执行情况汇总
public class VPODelay implements DictAble, Serializable {
	
	private static final long serialVersionUID = 1L;
	
	@Transient
	private Map<String, String> textMap;

	public String putText(String key, String value) {
		if (textMap == null) {
			textMap = new HashMap<>();
		}
		return textMap.put(key, value);
	}

	@Id
	@Column(name = "PURC_CNT")
	@Schema(description = "采购频次")
	private BigDecimal purcCnt;

	@Column(name = "DELAY_CNT")
	@Schema(description = "延期次数")
	private BigDecimal delayCnt;


	@Column(name = "DELAY_PERCENT")
	@Schema(description = "延期率(%)")
	private BigDecimal delayPercent;


	@Column(name = "ONTIME_PERCENT")
	@Schema(description = "准时率(%)")
	private BigDecimal ontimePercent;

}
